from lib.Skill import EffectType
from lib.Character.Base import Base
from lib.Skill.Effect import RoundEffect


class Buff(RoundEffect):
    def __init__(self, name, buff_type, round, target_self=False):
        super(Buff, self).__init__(name, buff_type, target_self, round)
        self.vertigo = False
        self.move = False
        if self.effect_type is EffectType.BUFF_VERTIGO:
            self.vertigo = True
        if self.effect_type is EffectType.BUFF_MOVE:
            self.move = True


class BuffBase(RoundEffect):
    def __init__(self, name, round, base, target_self=False):
        super(BuffBase, self).__init__(name, EffectType.BUFF_BASE, round, target_self)
        if not isinstance(base, Base):
            raise AttributeError('base must type Character.Base')
        self.base = base
